package com.yt.user.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.yt.user.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.yt.user.mapper.SysUserRoleMapper;
import com.yt.user.models.service.ISysUserRoleService;
import com.yt.user.models.bo.SysUserRoleSaveBO;
import com.yt.user.models.dto.SysUserRoleDTO;

/**
 * 登录控制器
 *
 * @author xieyanfei
 * @Date 2025-09-05 17:59:04
 */
@DubboService
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRoleDTO> implements ISysUserRoleService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(SysUserRoleSaveBO saveBO) {
        SysUserRoleDTO dto = new SysUserRoleDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
